package com.shopnight.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.shopnight.entity.ErrandOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shopnight.result.ApiResult;
import com.shopnight.vo.ErrandInfoVo;
import com.shopnight.vo.RiderErrandInfoVo;

import java.util.List;

/**
* @author 13201
* @description 针对表【errand_order】的数据库操作Service
* @createDate 2023-04-08 18:19:36
*/
public interface ErrandOrderService extends IService<ErrandOrder> {

    JSONObject addErrandOrder(ErrandOrder errandOrder) throws Exception;

     void errandOrderCallback(String plainText);

     void getUserErandOrderList(List<Object> list, List<Integer> errandIds);
     void getRiderErandOrderList(List<Object> list, List<Integer> errandIds);
     void getReceivingErandOrderList(List<Object> list, List<Integer> errandIds);

     //获取跑腿订单详情
    ErrandInfoVo getErrandOrderInfo(Integer errandId);

    RiderErrandInfoVo getErrandOrderInfoByRider(Integer errandId);

    //接单接口
    void receivingOrder(Integer userId, Integer orderId);


    void riderCompleteOrder(Integer userId,Integer orderType, Integer orderId);

    ApiResult cancelErrandOrder(Integer id);
}
